package com.example.controller;

import com.example.pojo.Result;
import com.example.pojo.VO.BookTypeVO;
import com.example.service.BookTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BookTypeController {
    @Autowired
    private BookTypeService bookTypeService;
    @GetMapping("/bookType")
    public Result<List<BookTypeVO>> getBookTypeNameAndId(){
        List<BookTypeVO> list = bookTypeService.getBookTypeNameAndId();
        return Result.ok(list);


    }
}
